﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title></title>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
        html
        {
            height: 100%;
        }
        body
        {
            height: 100%;
            margin: 0px;
            padding: 0px;
        }
        #map_canvas
        {
            height: 100%;
        }
    </style>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
    </script>
    <script type="text/javascript">
        var map;
        var latlng;
        var lat;
        var lng;
        var zoom;

        function Init() {
            lat = 40.632915;
            lng = -8.68929;
            zoom = 18;
            latlng = new google.maps.LatLng(lat, lng);

            var options = {
                zoom: 18,
                center: latlng,
                mapTypeId: google.maps.MapTypeId.SATELLITE
            };

            map = new google.maps.Map(document.getElementById("map_canvas"), options);
        }

        function Reset() {
            try {
                lat = 40.632915;
                lng = -8.68929;
                zoom = 18;
                latlng = new google.maps.LatLng(lat, lng);

                var options = {
                    zoom: 18,
                    center: latlng,
                    mapTypeId: google.maps.MapTypeId.SATELLITE
                };

                map = new google.maps.Map(document.getElementById("map_canvas"), options);
            }
            catch (ex) {
                window.alert("Reset:Error");
            }
        }

        function Pan(x, y) {
            try {
                lat = lat + x;
                lng = lng + y;

                map.panTo(new google.maps.LatLng(lat, lng));
            }
            catch (ex) {
                window.alert("Pan:Error");
            }
        }

        function Zoom() {
            try {
                zoom = zoom - 1;
                map.setZoom(zoom);
            }
            catch (ex) { 
            }
        }
    
    </script>
</head>
<body onload="Init()">
    <div id="map_canvas" style="width: 100%; height: 100%">
    </div>
</body>
</html>
